<admintpl file="header"/>
</head>
<style type="text/css">
	.num{
		 background:#66ffff repeat-x;
		 padding-top:3px;
		 border-top:1px solid #708090;
		 border-right:1px solid #708090;
		 border-bottom:1px solid #708090;
		 border-left:1px solid #708090; 
		 width:80px;
		 height:30px;
		 font-size:10pt;
		 cursor:hand
	}
</style>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:U('Admin/User/moremany')}">用户详情</a></li>
    </ul>
    <table class="table table-hover table-bordered" style="width:100%;">
			<th>序号：{$data.user_id}</th>
			<tbody >
				<tr>
					<td>昵称</td>
					<td>{$data.nickname}</td>
				</tr>
				<tr>
					<td>性别</td>
					<td>
						<if condition="$data.sex  eq 1 
							">男
						<elseif condition="$data.sex eq 0"/>女
						<else />
						</if>
					</td>
				</tr>
				<tr>
					<td>头像</td>
					<td><img src="{$data.avatar}" width="120" height="120" /></td>
				</tr>
				<if condition="$mobile_status eq 1 ">
					<tr>
						<td>手机号</td>
						<td>{$data.mobile_phone}</td>
					</tr>
				<else />
				</if>
				<tr>
					<td>注册时间</td>
					<td>{$data.register_time}</td>
				</tr>
				<tr>
					<td>所在地</td>
					<td>{$province_name}{$area_name}</td>
				</tr>
				<tr>
					<td>生日</td>
					<td>{$data.birthday}</td>
				</tr>
				<if condition="$mobile_status eq 1 ">
						<tr>
							<td>密码</td>
							<td>
								<input type="text" id="pwd" placeholder="请输入新密码"/>
								<span id="password"></span>&nbsp;&nbsp;&nbsp;
								<input type="button" class="btn btn-primary" id="update" value="修改" />
								<input type="hidden" id="user_id" value="{$data.user_id}" />
							</td>
					</tr>
				<else />
				</if>
				<tr>
					<td colspan="2"><a href="{:U('Admin/User/lists')}"><input type="button" style="float:right;width:80px;height:40px;" name="query_form_btn" class="btn btn-primary" value="返回"/></a></td>
				</tr>
			</tbody>
		</table>
</div>
</body>
</html>
<script src="__PUBLIC__/js/2.1.4jquery.js"></script>
<script type="text/javascript">
	$("#update").click(function(){
		var pwd=$("#pwd").val();
		var user_id=$("#user_id").val();
		var i = window.confirm("确定要修改？");
		if(i==true){
			$.ajax({
			   type: "POST",
			   url: "{:U('Admin/User/update')}",
			   data: "pwd="+pwd+"&user_id="+user_id,
			   success: function(msg){
				 if(msg=='1'){
					alert('修改成功');
				 }else if(msg=='2'){
					alert('修改失败');
				 }
			   }
			});
		}else{ 
			return false;
		}
	});
</script>